package QQClient;

import java.io.DataOutputStream;

public class ChatSendThread extends Thread {
	public ChatSendThread(int userQQ,String input,DataOutputStream douts,int destQQ){
		this.douts=douts;
		this.input=input;
		this.destQQ=destQQ;
		this.userQQ=userQQ;
	}

	public void run(){
		try{
			byte[] temb=input.getBytes();
			douts.writeInt(temb.length+9+4);
			douts.writeByte(3);
			douts.writeInt(destQQ);

			douts.writeInt(userQQ);
			douts.write(temb);
			douts.flush();

		}catch(Exception e){
			e.printStackTrace();
		 }
	}
	private int userQQ;
	private int destQQ;
	private String input;
	private DataOutputStream douts;

}
